﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lcmyjobs.Web.Admin
{
    public partial class ShowEnterpriseOffer : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["adminName"] != null)
                {
                    if (Session["ShowEnterpriseOffer"] != null)
                    {
                        strid = Session["ShowEnterpriseOffer"].ToString();
                        int enterprise_oid = (Convert.ToInt32(strid));
                        ShowInfo(enterprise_oid);
                    }
                }
                else
                {
                    Maticsoft.Common.MessageBox.ResponseScript(this, "alert('请先登陆！');top.location.href='adminlogin2.aspx'");
                }

            }
        }

        private void ShowInfo(int enterprise_oid)
        {
            lcmyjobs.BLL.enterprise_offer bll = new lcmyjobs.BLL.enterprise_offer();
            lcmyjobs.Model.enterprise_offer model = bll.GetModel(enterprise_oid);

            this.lblintroducername.Text = model.introducername;
            this.lblinfoperson.Text = model.infoperson;
            this.lblintroducerid.Text = model.introducerid;
            this.lblmobilphone.Text = model.mobilphone;
            this.lblemail.Text = model.email;
            this.lblotime.Text = model.otime.ToString();

            this.lblstatus.Text = Getstr(model.status.Value);

        }

        private string Getstr(int st)
        {
            string re = "";
            if (st == 0)
            {
                re = "未处理";
            }
            if (st == 1)
            {
                re = "处理中";
            }
            if (st == 2)
            {
                re = "成功";
            }
            if (st == 3)
            {
                re = "失败";
            }

            return re;
        }

    }
}